/* Copyright 203-2115 AtomWare Technology Pty Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 * The flowing information must be keep 
 * ProductComeoutItem.java
 * business
 * 2013-3-12下午3:29:57
 * @author 屈甲康
 * QQ285799123
 * mailto:qujiakang@gmail.com
 */

package org.jackysoft.entity;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.Type;
import org.jackysoft.entity.AbstractEntity;
import org.jackysoft.entity.User;
import org.joda.time.DateTime;


@Entity
public class ProductComeoutItem extends AbstractEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4125497668281105299L;
	private Contract contract;
	private Product product;
	private Integer boxes = 0;
	private String batchName;
	private Double value = 0D;
	private DateTime fireDate;
	private User worker;
	
	

	@ManyToOne
	public Contract getContract() {
		return contract;
	}

	@ManyToOne
	public Product getProduct() {
		return product;
	}

	public Integer getBoxes() {
		return boxes;
	}

	public String getBatchName() {
		return batchName;
	}

	public Double getValue() {
		return value;
	}

	public void setContract(Contract contract) {
		this.contract = contract;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public void setBoxes(Integer boxes) {
		this.boxes = boxes;
	}

	public void setBatchName(String batchName) {
		this.batchName = batchName;
	}

	public void setValue(Double value) {
		this.value = value;
	}

	@Type(type = "jodatime")
	public DateTime getFireDate() {
		return fireDate;
	}

	public void setFireDate(DateTime fireDate) {
		this.fireDate = fireDate;
	}

	@ManyToOne
	public User getWorker() {
		return worker;
	}

	public void setWorker(User worker) {
		this.worker = worker;
	}

}
